package com.bw.my.mvvm.user.model;


import com.bw.mvvm.entity.BaseEntity;
import com.bw.mvvm.mvvm.model.BaseModel;
import com.bw.mvvm.network.ChangeFunction;
import com.bw.mvvm.network.load.HttpEnum;
import com.bw.mvvm.network.load.HttpFactory;
import com.bw.my.mvvm.user.Api;

import io.reactivex.Observable;
import okhttp3.RequestBody;

public class LoginModel extends BaseModel {


    public Observable<BaseEntity> requestLogin(RequestBody body){
        return  HttpFactory.create(HttpEnum.TokenSign).getRetrofit()
                .create(Api.class).requestLogin(body).map(new ChangeFunction<>());
    }
}
